package com.springaction.knights;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class KnightMain {
 
	public static void main(String[] args){
		//加载Spring上下文
		//META-INF/spring/knights.xml
		ClassPathXmlApplicationContext context= 
				new ClassPathXmlApplicationContext("META-INF/spring/minstrel.xml");
		//获取knight bean 
		Knight knight=context.getBean(Knight.class);
		//使用 knight
		knight.embarkOnQuest();
		context.close();
	}
}
